package de.baumann.browser.api.net.util;


import java.util.List;

import de.baumann.browser.api.net.PackApiService;
import de.baumann.browser.api.net.base.ApiBuilder;
import de.baumann.browser.api.net.vo.PacketDetail;
import de.baumann.browser.api.net.vo.PacketMark;
import de.baumann.browser.api.net.vo.PacketRecord;
import de.baumann.browser.api.net.vo.PacketStatus;
import de.baumann.browser.api.net.vo.Result;
import io.reactivex.Observable;

public class PackHttpUtil {
    private static PackApiService apiService;

    static {
        apiService = ApiBuilder.buildService(PackApiService.class);
    }

    public static Observable<Result<List<PacketMark>>> getPackets( String city) {
        return apiService.getPackets(city);
    }

    public static Observable<Result<PacketMark>> getPackets1(String userId, String city,String token) {
        return apiService.getPackets1(userId, city,token);
    }

    public static Observable<Result<PacketStatus>> getPacketStatus( int packetId) {
        return apiService.getPacketStatus(packetId);
    }

    public static Observable<Result<PacketStatus>> rePacket(int packetId) {
        return apiService.rePacket(packetId);
    }


    public static Observable<Result<PacketDetail>> details( int packetId) {
        return apiService.details( packetId);
    }


    public static Observable<Result> sendPack(
            String description,
            String imgUrl,
            int packetAmount,
            int totalCount,
            String adUrl,
            String packetLocation) {
        return apiService.sendPack(description, imgUrl, packetAmount, totalCount, adUrl, packetLocation);
    }

    public static Observable<Result<PacketRecord>> getRecivedPacks() {
        return apiService.getRecivedPacks();
    }

    public static Observable<Result<PacketRecord>> getSendPacks() {
        return apiService.getSendPacks();
    }


}
